product_name=NeoKylin
product_edition=Server
product_version=5.0
product_arch=loongson_64
product_version_id=${product_version}_U2
product_type=Release
product_build_id=013.4
product_build_date=$(date +%Y%m%d)

readonly SCRIPT_NAME=$(basename $0)

log() {
  echo "$@"
  logger -p user.notice -t $SCRIPT_NAME "$@"
}

err() {
  echo "$@" >&2
  logger -p user.error -t $SCRIPT_NAME "$@"
}

#log "writing to stdout"
#err "writing to stderr"

GREEN=$(tput setaf 2)
BOLD=$(tput bold)
RESET=$(tput sgr0)

readonly PRODUCTINFO_ISO=${product_name}-${product_edition}-${product_version_id}-${product_arch}-${product_type}-B${product_build_id}-${product_build_date}

readonly PRODUCTINFO_ETC=$(cat <<EOF
-${product_name} ${product_edition}
-${product_version_id}
-${product_arch}
-${product_type}
-B${product_build_id}/${product_build_date}
EOF
)
